﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Runtime.Serialization;
using Celeriq.Common;

namespace Celeriq.Utilities
{
	[ServiceContract]
	public interface IRepositoryService
	{
		[OperationContract]
		int StartUp(ServiceStartup startup);

		[OperationContract]
		void ShutDown();

		[OperationContract]
		void Reset(ServiceStartup startup);

		[OperationContract]
		Guid GetID();

		[OperationContract]
		bool Backup(ServiceStartup startup, UserCredentials credentials, string backupFile);

		[OperationContract]
		bool ExportSchema(ServiceStartup startup, UserCredentials credentials, string backupFile);

		[OperationContract]
		bool Restore(ServiceStartup startup, UserCredentials credentials, string backupFile);

		[OperationContract]
		long? GetDataSize(UserCredentials credentials);

		[OperationContract]
		long? GetItemCount(UserCredentials credentials);

		[OperationContract]
		void Compress(UserCredentials credentials);

		[OperationContract]
		void UnloadData();

		[DataMember]
		DateTime LastAccess { get; }

	}
}